package com.ztao.schedule;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

//@Component
public class Test1 {
    @Scheduled(cron = "0/1 * * * * ?")
    public void test1(){
        System.out.println("每秒执行一次"+new Date().toLocaleString());
    }
}
